﻿using UnityEngine;
using System.Collections;

namespace Room
{
    public class RCAIUnionOther : RCAIUnionActor
    {
        public float lastTime;
        public int killNum;

        public RCAIUnionOther(RoomCharactor owner)
            :base(owner)
        {
            this.type = AIType.UnionOther;
        }

        public override void SetKillNum(int killNum)
        {
            this.killNum = killNum;
            var data = Dict.Blo.DictKillerBlo.GetKillerData(killNum);
            var color = new Color(data.colorR / 255f, data.colorG / 255f, data.colorB / 255f);
            owner.ui.SetColor(color);
        }
        public override int GetKillNum()
        {
            return killNum;
        }

        public override void Tick()
        {
            base.Tick();

            if (Time.time - lastTime > 1f)
            {
                lastTime = Time.time;
            }

            //if (owner.IsMoving())
            //{
            //    owner.PlayAnim("run");
            //}
            //else 
            //{
            //    owner.PlayAnim("stand");
            //}
        }
    }
}